Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

A simple POC to change non KRM files to a structured k8s resource #11

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yuwenma
Copy link

@yuwenma yuwenma commented Jul 29, 2022

Related to Sane merge behavior for non-KRM files

This PR structures a INI file in the form of ConfigMap key-value pairs in the client side, so that kpt can do granular merging during update, and re-generate the actual INI by defining a custom initContainer (env-to-ini) on the cluster side.

port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
cm.mysqld.skip-name-resolve: "false"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume there's also a program to generate this format from INI?

Copy link
Author

@yuwenma yuwenma Jul 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I actually just use the Sublime multi-line operation to convert the file.
To better reflect the Option 2 approach, added the python script to generate this from INI (second commit).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants